Merge fix from maemo-gtk:
authorMichael Natterer <mitch@imendio.com>
Fri, 25 May 2007 09:33:05 +0000 (09:33 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Fri, 25 May 2007 09:33:05 +0000 (09:33 +0000)
2007-05-25  Michael Natterer  <mitch@imendio.com>

Merge fix from maemo-gtk:

* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): open submenus
also if the menu item we're entering is already selected. Also, it
makes no sense to forward the event to the parent menu shell if we
are entering a menu item of *this* menu shell.

svn path=/trunk/; revision=17911

ChangeLog
gtk/gtkmenushell.c

index 65e6cb7af797854120f93c829da874f2bbb14c6f..8bf2f15ff21bcf9a0effaa8e2d7dcca6732b96b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-05-25  Michael Natterer  <mitch@imendio.com>
+
+       Merge fix from maemo-gtk:
+
+       * gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): open submenus
+       also if the menu item we're entering is already selected. Also, it
+       makes no sense to forward the event to the parent menu shell if we
+       are entering a menu item of *this* menu shell.
+
 2007-05-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/stock-icons/*: Make sure all svg icons are added
index 65ddc1211b9b1328d6b4668600d42e1ba9ce6fa7..250c0ac7372a1b5cc6d1c094329791970da8025f 100644 (file)
@@ -789,18 +789,17 @@ gtk_menu_shell_enter_notify (GtkWidget        *widget,
          (GTK_IS_MENU_ITEM (menu_item) && 
           !_gtk_menu_item_is_selectable (menu_item)))
        return TRUE;
-      
-      if ((menu_item->parent == widget) &&
-         (menu_shell->active_menu_item != menu_item) &&
+
+      if (menu_item->parent == widget &&
          GTK_IS_MENU_ITEM (menu_item))
        {
          if (menu_shell->ignore_enter)
            return TRUE;
-         
-         if ((event->detail != GDK_NOTIFY_INFERIOR) &&
-             (GTK_WIDGET_STATE (menu_item) != GTK_STATE_PRELIGHT))
-           {
-             gtk_menu_shell_select_item (menu_shell, menu_item);
+
+         if (event->detail != GDK_NOTIFY_INFERIOR)
+            {
+             if (GTK_WIDGET_STATE (menu_item) != GTK_STATE_PRELIGHT)
+                gtk_menu_shell_select_item (menu_shell, menu_item);
 
               /* If any mouse button is down, and there is a submenu
                * that is not yet visible, activate it. It's sufficient